import request from '@/utils/request'

export default {
  /*
	@jobQuery {Object} jobQuery : 查询参数
	{
		projectId:[string] -项目Id,
		cubeId:[string] - cubeId,
		startDate:[string] - 开始日期,
		endDate:[string] - 结束日期

	}
*/
  jobSurvey: (params) => request.get('/kylin/job/jobSurvey', {
    params: {
      projectId: params.projectId,
      cubeId: params.cubeId,
      startDate: params.startDate,
      endDate: params.endDate
    }}).then(resp => resp.data),
  /*
	@jobQuery {Object} jobQuery : 查询参数
	{
		projectId:[string] -项目Id,
		cubeId:[string] - cubeId,
		startDate:[string] - 开始日期,
		endDate:[string] - 结束日期,
		owner:[string] -负责人oa账号
		status:[string] -job状态
    orderBy:[string] -排序属性
    sort:[string] -排序升序降序
	}
	@page {Object} page : 分页
	{
	  page:[integer] -页码
    limit:[integer] -每页条数
	}
*/
  jobList: (params) => request.get('/kylin/job/jobList', { params }).then(resp => resp.data),
  /*
   id:[string] -jobId
  */
  jobInfo: (id) => request.get(`/kylin/job/${id}`).then(resp => resp.data)
}
